package edu.pku.sei.act.ctrl.editpart;

import java.beans.PropertyChangeEvent;

import org.eclipse.draw2d.IFigure;

import edu.pku.sei.act.ctrl.figure.ActivityFinalFigure;
import edu.pku.sei.act.ctrl.figure.LIPFigure;
import edu.pku.sei.act.images.ArchiModelImageProvider;
import edu.pku.sei.act.model.mote.ActivityFinal;
import edu.pku.sei.act.model.mote.LIP;
import edu.pku.sei.gmp.controller.editpart.GMPNodeEditPart;

public class ActivityFinalEditPart extends GMPNodeEditPart{
	
	protected IFigure createFigure() {
		return new ActivityFinalFigure("ActivityFinal",ArchiModelImageProvider.ACTIVITYFINALLAEGE);
	}

	private ActivityFinal getActivityFinal() {
		return (ActivityFinal) getModelElement();
	}

	public void handlePropertyChanged(PropertyChangeEvent event) {
		refreshVisuals();
		super.handlePropertyChanged(event);
	}

	protected void refreshVisuals() {
		((ActivityFinalFigure)figure).setName("ActivityFinal");
		super.refreshVisuals();
	}

}
